
AddCSLuaFile('shared.lua')



GM.Name 	= 'Rewired'
GM.Author 	= 'Erkle'
GM.Email 	= ''
GM.Website 	= 'www.wiremod.com'



rewired_callbacks = {}
rewired_callbacks['construct'] = {}
rewired_callbacks['destruct'] = {}
rewired_callbacks['preexecute'] = {}
rewired_callbacks['postexecute'] = {}

rewired_types = {}
rewired_types2 = {}
local funcs = {}
funclist = funclist or {}

function registerType(name, id, def, incb, outcb)
	rewired_types[string.upper(name)] = {id, def, incb, outcb}
	rewired_types2[id] = {string.upper(name), def, incb, outcb}
end


function registerCallback(event, callback)
	rewired_callbacks[event][#rewired_callbacks[event] + 1] = callback
end

function registerCallback(event, callback)
	rewired_callbacks[event][#rewired_callbacks[event] + 1] = callback
end

function registerOperator(name, pars, rets, func)
	funcs['op:' .. name .. '(' .. pars .. ')'] = { 'op:' .. name .. '(' .. pars .. ')', rets, func }
end

function registerFunction(name, pars, rets, func)
	funcs[name .. '(' .. pars .. ')'] = { name .. '(' .. pars .. ')', rets, func }
	funclist[name] = true
end

include('expression2/init.lua')
